/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package EA_Model.IEC61970.Generation.Production.impl;

import EA_Model.IEC61970.Core.impl.CurveImpl;

import EA_Model.IEC61970.Domain.ActivePower;
import EA_Model.IEC61970.Domain.PU;

import EA_Model.IEC61970.Generation.Production.HeatInputCurve;
import EA_Model.IEC61970.Generation.Production.HeatRate;
import EA_Model.IEC61970.Generation.Production.ProductionPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Heat Input Curve</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link EA_Model.IEC61970.Generation.Production.impl.HeatInputCurveImpl#getAuxPowerMult <em>Aux Power Mult</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Generation.Production.impl.HeatInputCurveImpl#getAuxPowerOffset <em>Aux Power Offset</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Generation.Production.impl.HeatInputCurveImpl#getHeatInputEff <em>Heat Input Eff</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Generation.Production.impl.HeatInputCurveImpl#getHeatInputOffset <em>Heat Input Offset</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Generation.Production.impl.HeatInputCurveImpl#getIsNetGrossP <em>Is Net Gross P</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class HeatInputCurveImpl extends CurveImpl implements HeatInputCurve {
	/**
	 * The cached value of the '{@link #getAuxPowerMult() <em>Aux Power Mult</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getAuxPowerMult()
	 * @generated
	 * @ordered
	 */
	protected PU auxPowerMult;

	/**
	 * The cached value of the '{@link #getAuxPowerOffset() <em>Aux Power Offset</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getAuxPowerOffset()
	 * @generated
	 * @ordered
	 */
	protected ActivePower auxPowerOffset;

	/**
	 * The cached value of the '{@link #getHeatInputEff() <em>Heat Input Eff</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getHeatInputEff()
	 * @generated
	 * @ordered
	 */
	protected PU heatInputEff;

	/**
	 * The cached value of the '{@link #getHeatInputOffset() <em>Heat Input Offset</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getHeatInputOffset()
	 * @generated
	 * @ordered
	 */
	protected HeatRate heatInputOffset;

	/**
	 * The cached value of the '{@link #getIsNetGrossP() <em>Is Net Gross P</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getIsNetGrossP()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Boolean isNetGrossP;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected HeatInputCurveImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return ProductionPackage.Literals.HEAT_INPUT_CURVE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PU getAuxPowerMult() {
		if (auxPowerMult != null && auxPowerMult.eIsProxy()) {
			InternalEObject oldAuxPowerMult = (InternalEObject)auxPowerMult;
			auxPowerMult = (PU)eResolveProxy(oldAuxPowerMult);
			if (auxPowerMult != oldAuxPowerMult) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProductionPackage.HEAT_INPUT_CURVE__AUX_POWER_MULT, oldAuxPowerMult, auxPowerMult));
			}
		}
		return auxPowerMult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PU basicGetAuxPowerMult() {
		return auxPowerMult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setAuxPowerMult(PU newAuxPowerMult) {
		PU oldAuxPowerMult = auxPowerMult;
		auxPowerMult = newAuxPowerMult;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ProductionPackage.HEAT_INPUT_CURVE__AUX_POWER_MULT, oldAuxPowerMult, auxPowerMult));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActivePower getAuxPowerOffset() {
		if (auxPowerOffset != null && auxPowerOffset.eIsProxy()) {
			InternalEObject oldAuxPowerOffset = (InternalEObject)auxPowerOffset;
			auxPowerOffset = (ActivePower)eResolveProxy(oldAuxPowerOffset);
			if (auxPowerOffset != oldAuxPowerOffset) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProductionPackage.HEAT_INPUT_CURVE__AUX_POWER_OFFSET, oldAuxPowerOffset, auxPowerOffset));
			}
		}
		return auxPowerOffset;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActivePower basicGetAuxPowerOffset() {
		return auxPowerOffset;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setAuxPowerOffset(ActivePower newAuxPowerOffset) {
		ActivePower oldAuxPowerOffset = auxPowerOffset;
		auxPowerOffset = newAuxPowerOffset;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ProductionPackage.HEAT_INPUT_CURVE__AUX_POWER_OFFSET, oldAuxPowerOffset, auxPowerOffset));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PU getHeatInputEff() {
		if (heatInputEff != null && heatInputEff.eIsProxy()) {
			InternalEObject oldHeatInputEff = (InternalEObject)heatInputEff;
			heatInputEff = (PU)eResolveProxy(oldHeatInputEff);
			if (heatInputEff != oldHeatInputEff) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProductionPackage.HEAT_INPUT_CURVE__HEAT_INPUT_EFF, oldHeatInputEff, heatInputEff));
			}
		}
		return heatInputEff;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PU basicGetHeatInputEff() {
		return heatInputEff;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setHeatInputEff(PU newHeatInputEff) {
		PU oldHeatInputEff = heatInputEff;
		heatInputEff = newHeatInputEff;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ProductionPackage.HEAT_INPUT_CURVE__HEAT_INPUT_EFF, oldHeatInputEff, heatInputEff));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public HeatRate getHeatInputOffset() {
		if (heatInputOffset != null && heatInputOffset.eIsProxy()) {
			InternalEObject oldHeatInputOffset = (InternalEObject)heatInputOffset;
			heatInputOffset = (HeatRate)eResolveProxy(oldHeatInputOffset);
			if (heatInputOffset != oldHeatInputOffset) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProductionPackage.HEAT_INPUT_CURVE__HEAT_INPUT_OFFSET, oldHeatInputOffset, heatInputOffset));
			}
		}
		return heatInputOffset;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public HeatRate basicGetHeatInputOffset() {
		return heatInputOffset;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setHeatInputOffset(HeatRate newHeatInputOffset) {
		HeatRate oldHeatInputOffset = heatInputOffset;
		heatInputOffset = newHeatInputOffset;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ProductionPackage.HEAT_INPUT_CURVE__HEAT_INPUT_OFFSET, oldHeatInputOffset, heatInputOffset));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean getIsNetGrossP() {
		if (isNetGrossP != null && isNetGrossP.eIsProxy()) {
			InternalEObject oldIsNetGrossP = (InternalEObject)isNetGrossP;
			isNetGrossP = (EA_Model.IEC61970.Domain.Boolean)eResolveProxy(oldIsNetGrossP);
			if (isNetGrossP != oldIsNetGrossP) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProductionPackage.HEAT_INPUT_CURVE__IS_NET_GROSS_P, oldIsNetGrossP, isNetGrossP));
			}
		}
		return isNetGrossP;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean basicGetIsNetGrossP() {
		return isNetGrossP;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setIsNetGrossP(EA_Model.IEC61970.Domain.Boolean newIsNetGrossP) {
		EA_Model.IEC61970.Domain.Boolean oldIsNetGrossP = isNetGrossP;
		isNetGrossP = newIsNetGrossP;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ProductionPackage.HEAT_INPUT_CURVE__IS_NET_GROSS_P, oldIsNetGrossP, isNetGrossP));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case ProductionPackage.HEAT_INPUT_CURVE__AUX_POWER_MULT:
				if (resolve) return getAuxPowerMult();
				return basicGetAuxPowerMult();
			case ProductionPackage.HEAT_INPUT_CURVE__AUX_POWER_OFFSET:
				if (resolve) return getAuxPowerOffset();
				return basicGetAuxPowerOffset();
			case ProductionPackage.HEAT_INPUT_CURVE__HEAT_INPUT_EFF:
				if (resolve) return getHeatInputEff();
				return basicGetHeatInputEff();
			case ProductionPackage.HEAT_INPUT_CURVE__HEAT_INPUT_OFFSET:
				if (resolve) return getHeatInputOffset();
				return basicGetHeatInputOffset();
			case ProductionPackage.HEAT_INPUT_CURVE__IS_NET_GROSS_P:
				if (resolve) return getIsNetGrossP();
				return basicGetIsNetGrossP();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case ProductionPackage.HEAT_INPUT_CURVE__AUX_POWER_MULT:
				setAuxPowerMult((PU)newValue);
				return;
			case ProductionPackage.HEAT_INPUT_CURVE__AUX_POWER_OFFSET:
				setAuxPowerOffset((ActivePower)newValue);
				return;
			case ProductionPackage.HEAT_INPUT_CURVE__HEAT_INPUT_EFF:
				setHeatInputEff((PU)newValue);
				return;
			case ProductionPackage.HEAT_INPUT_CURVE__HEAT_INPUT_OFFSET:
				setHeatInputOffset((HeatRate)newValue);
				return;
			case ProductionPackage.HEAT_INPUT_CURVE__IS_NET_GROSS_P:
				setIsNetGrossP((EA_Model.IEC61970.Domain.Boolean)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case ProductionPackage.HEAT_INPUT_CURVE__AUX_POWER_MULT:
				setAuxPowerMult((PU)null);
				return;
			case ProductionPackage.HEAT_INPUT_CURVE__AUX_POWER_OFFSET:
				setAuxPowerOffset((ActivePower)null);
				return;
			case ProductionPackage.HEAT_INPUT_CURVE__HEAT_INPUT_EFF:
				setHeatInputEff((PU)null);
				return;
			case ProductionPackage.HEAT_INPUT_CURVE__HEAT_INPUT_OFFSET:
				setHeatInputOffset((HeatRate)null);
				return;
			case ProductionPackage.HEAT_INPUT_CURVE__IS_NET_GROSS_P:
				setIsNetGrossP((EA_Model.IEC61970.Domain.Boolean)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case ProductionPackage.HEAT_INPUT_CURVE__AUX_POWER_MULT:
				return auxPowerMult != null;
			case ProductionPackage.HEAT_INPUT_CURVE__AUX_POWER_OFFSET:
				return auxPowerOffset != null;
			case ProductionPackage.HEAT_INPUT_CURVE__HEAT_INPUT_EFF:
				return heatInputEff != null;
			case ProductionPackage.HEAT_INPUT_CURVE__HEAT_INPUT_OFFSET:
				return heatInputOffset != null;
			case ProductionPackage.HEAT_INPUT_CURVE__IS_NET_GROSS_P:
				return isNetGrossP != null;
		}
		return super.eIsSet(featureID);
	}

} //HeatInputCurveImpl
